/*
 * Copyright 2013-2019 Xia Jun(3979434@qq.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 ***************************************************************************************
 *                                                                                     *
 *                        Website : http://www.farsunset.com                           *
 *                                                                                     *
 ***************************************************************************************
 */
package com.workcell.workdata.im.service;

import com.workcell.workdata.im.entity.MomentRule;

import java.util.List;

public interface MomentRuleService {

	void save(MomentRule model);

	void delete(MomentRule model);

	/**
	 * 查询我是否被对方限制访问TA的空间
	 * 
	 * @param uid
	 *            我的ID
	 * @param targetId
	 *            对方UD
	 * @return true 被限制的，false 没有被限制
	 */
	boolean isBlacked(Long uid, Long targetId);

	/**
	 * 查询我是不看TA的朋友圈
	 */
	boolean isIgnored(Long uid, Long targetId);

	/**
	 * 查询我设置过的朋友圈权限列表
	 * 
	 * @param uid
	 *            我的账号
	 * @return
	 */
	List<MomentRule> queryList(Long uid);

	/**
	 * 我不通知的用户列表
	 * 包含 我不让看的 和 不看我的
	 * @param uid
	 * @return
	 */
	List<Long> findNonNotifiableList(Long uid);


	/**
	 * 查询我看不到的用户ID列表
	 * 包含 我不看的 和 不让我看的
	 * @param uid
	 * @return
	 */
	List<Long> findInvisibleList(Long uid);

	/**
	 * 我不让看的用户ID列表
	 * @param uid
	 * @return
	 */
	List<Long> findMeBlockedList(Long uid);


	/**
	 * 查询我不看的用户ID列表
	 * @param uid
	 * @return
	 */
	List<Long> findMeIgnoreList(Long uid);


	/**
	 * 不让我看的用户ID列表
	 * @param uid
	 * @return
	 */
	List<Long> findBlockedMeList(Long uid);


	/**
	 * 不看我的用户ID列表
	 * @param uid
	 * @return
	 */
	List<Long> findIgnoreMeList(Long uid);

}
